package com.diandian.backend.order.mapper;

import com.diandian.backend.order.domain.OrderOnlineDouyinLifeDetail;
import com.diandian.backend.order.dto.OrderOnlineDouyinLifeDetailAddParamDTO;
import com.diandian.backend.order.dto.OrderOnlineDouyinLifeDetailDetailParamDTO;
import com.diandian.backend.order.dto.OrderOnlineDouyinLifeDetailListParamDTO;
import com.diandian.backend.order.dto.OrderOnlineDouyinLifeDetailPageParamDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

@Mapper
public interface OrderOnlineDouyinLifeDetailMapper {

    // 查询记录数
    Integer getCount(@Param("data") OrderOnlineDouyinLifeDetailPageParamDTO requestDTO);

    // 查询分页中的数据集合
    List<OrderOnlineDouyinLifeDetail> getPage(@Param("data") OrderOnlineDouyinLifeDetailPageParamDTO requestDTO, @Param("pageSize") Integer pageSize, @Param("offset") Integer offset);

    // 查询详情
    OrderOnlineDouyinLifeDetail getDetail(@Param("data") OrderOnlineDouyinLifeDetailDetailParamDTO requestDTO);

    // 查询数据集合
    List<OrderOnlineDouyinLifeDetail> getList(@Param("data") OrderOnlineDouyinLifeDetailListParamDTO requestDTO);

    void deleteByTime(@Param("belong") String belong, @Param("startTime") Date startTime, @Param("endTime") Date endTime);

    void deleteByOrderNumAndBelong(@Param("belong") String belong, @Param("onlineOrderNum") String onlineOrderNum);

    void batchAdd(@Param("dataList") List<OrderOnlineDouyinLifeDetailAddParamDTO> dataList);
}